package com.bestcem.xm.txtanls.grpc.service.param.topic;

import com.bestcem.xm.common.core.constant.RegTypes;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.List;

import static com.bestcem.xm.common.core.constant.Constants.TEN;

/**
 * @author liheng
 * @version v1.0
 * @date 2021/5/20 17:36
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UpdateTopicParam {


    /**
     * 话题id
     */
    @NotBlank(message = "话题id不能为空")
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "话题id格式错误")
    private String id;

    /**
     * 文本分析项目id
     */
    private String projectId;

    /**
     * 话题名
     */
    @Size(max = TEN, message = "名称长度不能超过10")
    private String name;

    /**
     * 关键词
     */
    private List<String> keywords;

    /**
     * 修改关键词标志
     * false-修改话题名
     * true-修改关键词
     */
    private boolean updateKeywordFlag;

}
